package com.greenline.push.core.pushcenter.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.greenline.push.core.pushcenter.ClassUserManager;
import com.greenline.push.dal.pushcenter.ClassUserDAO;
import com.greenline.push.dal.pushcenter.dataobject.ClassUserDO;
import com.greenline.push.dal.query.ClassUserQuery;

public class ClassUserManagerImpl implements ClassUserManager {

	@Autowired
	private ClassUserDAO userDAO;

	@Override
	public Long insert(ClassUserDO classUser) {
		return userDAO.insert(classUser);
	}

	@Override
	public ClassUserDO getClassUserById(Long id) {
		return userDAO.getClassUserById(id);
	}

	@Override
	public boolean update(ClassUserDO classUser) {
		return userDAO.update(classUser) > 0;
	}

	@Override
	public ClassUserQuery listByQuery(ClassUserQuery query) {
		return userDAO.listByQuery(query);
	}

	@Override
	public boolean delete(Long id) {
		return userDAO.delete(id) > 0;
	}

	@Override
	public int insertUidList(List<Long> uidList, Long classId) {
		return userDAO.insertUidList(uidList, classId);
	}

}
